<template>
  <div class="error-page">
    <div class="content-con">
      <div class="text-con">
        <img :src="src" alt="授权登录">
        <h4 class="font-30 text-center">{{ message }}</h4>
        <div class="btn mt-40">
          <Button type="info" size="large" @click="confirm">跳转至登陆页</Button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import error404 from '@/assets/images/error-page/error-500.svg'
import { setClientToken } from '@/libs/util'
export default {
  name: 'error_message',
  data () {
    return {
      src: error404
    }
  },
  computed: {
    message () {
      return this.$route.query.message
    }
  },
  methods: {
    confirm () {
      setClientToken('')
      console.log(this.$route.query.clientId)
      console.log(this.$route.query.clientSecret)
      this.$router.push({
        name: 'third_party_login',
        query: {
          uken: this.$route.query.uken,
          clientId: this.$route.query.clientId,
          clientSecret: this.$route.query.clientSecret
        }
      })
    }
  }
}
</script>
<style lang="less" scoped>
  .error-page{
    width: 100%;
    height: 100%;
    position: relative;
    .content-con{
      width: 500px;
      position: absolute;
      top: 5%;
      left: 50%;
      margin-left: -250px;
      .btn{
        text-align: center;
      }
    }
  }
</style>

